package com.xt.web;

import com.xt.dto.User;
import com.xt.service.HelloService;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017/7/10.
 */
@RestController
public class RefactorController implements HelloService {

    @Override
    public String hello(String name) {
        return "hello "+name;
    }

    @Override
    public User hello(String name, Integer age) {
        return new User(name,age);
    }

    @Override
    public String hello(User user) {
        return "hello "+user.getUserName()+","+user.getAge();
    }
}
